#pragma once
#include "cupid.h"
namespace cupid
{

class	IServerSocket
{
public:
	static IServerSocket*	createNew(SOCKET sock);

	virtual IServerSocket*	getInterface() { return NULL; }

	virtual const char*	getPacket(int* len)	=	0;

	virtual bool clearPacket(int len)	=	0;

	virtual bool sendPacket(const char* pack, int len) = 0;

	virtual bool isOpen()	=	0;
	
	virtual void close()	=	0;

	virtual int	getPeerIP()	=	0;

	virtual SOCKET socket() =	0;

	virtual int setBufSize(int sendSize, int rcvSize)	=	0;

};

}